package com.tuxing.draa_data.dao.center;

import com.tuxing.draa_data.pojo.center.NewDcPeri;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author yuanshihang
 * @since 2021-12-03
 */
@Repository
public interface NewDcPeriDao extends BaseMapper<NewDcPeri> {

    /**
     * @param bid   图书Id
     * @param did   数据库ID
     * @param pid   资源包id
     * @param vYear 年份
     * @return 数量
     * @decpription 查询重复数量
     * @author yuanshihang
     * @date 2021/12/6 16:25
     * @version 1.0
     */
    NewDcPeri findOneByBidDidPidYear(@Param("jid") Long bid, @Param("did") Long did,
                                     @Param("pid") Long pid, @Param("vYear") Integer vYear);

    Integer updateByRecordId(@Param("newRecordId") Long newRecordId, @Param("oldRecordId") Long oldRecordId);

}
